/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2012
 */

package com.tudou.searchcontrol.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class Album implements java.io.Serializable{
	private static final long serialVersionUID = 1L;
	
	//alias
	public static final String TABLE_ALIAS = "Album";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_ALBUM_NAME = "albumName";
	public static final String ALIAS_DESCRIPTION = "description";
	public static final String ALIAS_IMG = "img";
	public static final String ALIAS_CHANNEL = "channel";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * id       db_column: id 
     */	
	
	private java.lang.Long id;
    /**
     * albumName       db_column: albumName 
     */	
	private java.lang.String albumName;
    /**
     * description       db_column: description 
     */	
	private java.lang.String description;
    /**
     * img       db_column: img 
     */	
	private java.lang.String img;
    /**
     * channel       db_column: channel 
     */	
	
	private java.lang.Integer channel;
	//columns END

	public Album(){
	}

	public Album(
		java.lang.Long id
	){
		this.id = id;
	}

	public void setId(java.lang.Long value) {
		this.id = value;
	}
	
	public java.lang.Long getId() {
		return this.id;
	}
	public void setAlbumName(java.lang.String value) {
		this.albumName = value;
	}
	
	public java.lang.String getAlbumName() {
		return this.albumName;
	}
	public void setDescription(java.lang.String value) {
		this.description = value;
	}
	
	public java.lang.String getDescription() {
		return this.description;
	}
	public void setImg(java.lang.String value) {
		this.img = value;
	}
	
	public java.lang.String getImg() {
		return this.img;
	}
	public void setChannel(java.lang.Integer value) {
		this.channel = value;
	}
	
	public java.lang.Integer getChannel() {
		return this.channel;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("AlbumName",getAlbumName())
			.append("Description",getDescription())
			.append("Img",getImg())
			.append("Channel",getChannel())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Album == false) return false;
		if(this == obj) return true;
		Album other = (Album)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

